There is a clever word completion mechanism in CSS mode which saves you keystrokes and time while typing. It also helps you to make sure no properties are misspelt.
Note! The word completion mechanism requires that the package Elec Completions is activated. To activate it make sure Elec Completions is checked in the dialog
As explained on the previous page you can use dialog windows to edit CSS properties, but perhaps you prefer simply to type them. Then the word completion mechanism can help you. Word completion is bound to ctrl-tab. (In Alpha 7.3 it is bound to cmd-tab, but this has been changed as it conflicts with Mac OS binding for switching between applications.)
Tip: If you prefer another key binding to ctrl-tab for word completion you can change it using
How word completion works is best explained with examples.
When you are outside a pair of braces Alpha tries to expand what you have typed to an HTML element. For example, if you type
blo
and hit ctrl-tab it is expanded to
BLOCKQUOTE
Continue by inserting a { and begin typing a CSS property
BLOCKQUOTE {
vert
Hitting ctrl-tab expands this to
BLOCKQUOTE { vertical-align:
Continue by typing a few letters of the value of vertical-align.
BLOCKQUOTE { vertical-align: bas
Hit ctrl-tab and this is expanded to
BLOCKQUOTE { vertical-align: baseline
Many properties can either take a value from a list of possible values or some other type of value. When completing CSS mode tries to match against the values in the list. For example 'marker-offset' can either take the values 'auto' or 'inherit' or a length. When completing the value for marker-offset, CSS modes matches against 'auto' and 'inherit'.
When you're typing a URL it can also be expanded using the URL cache, and when you type a color it is matched against the color names.